<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title> - 库房</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="__PUBLIC__/admin/favicon.ico">
    <link href="__PUBLIC__/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/animate.css" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <style>
        .table-actions {
            margin-bottom: 10px;
            padding: 0px;
        }
    </style>

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeIn">
        <div class="row">
            <div class="tabs-container">
                <ul class="nav nav-tabs">
                    <li class="active">
                        <a  href="{:url('kucun/storehouse')}" >出库</a>
                    </li>
                    <li >
                        <a  href="{:url('kucun/rollout')}" >转库</a>
                    </li>
                    <li class="">
                        <a  href="{:url('kucun/guihuan')}" >归还</a>
                    </li>
                    <li class="">
                        <a  href="{:url('kucun/mingxi')}" >出入库明细</a>
                    </li>
                    <!--<li class="active">
                        <a data-toggle="tab" href="#tab-1" aria-expanded="true">出库</a>
                    </li>
                    <li class="">
                        <a data-toggle="tab" href="#tab-3" aria-expanded="false">归还</a>
                    </li>
                    <li class="">
                        <a data-toggle="tab" href="#tab-9" aria-expanded="false">出入库明细</a>
                    </li>-->
                </ul>
                <div class="tab-content">

                    <div  class="tab-pane active">
                        <div class="panel-body">
                            <form action="{:url('kucun/storehouse')}" method="get" name="" enctype="multipart/form-data">
                                <div class="well form-inline panel-well">
                                    合同号：
                                    <input class="form-control" type="text" name="num" style="width: 120px;" value="">
                                    <button type="submit" class="btn btn-primary">搜索</button>
                                    <a href="{:url('kucun/storehouse')}" class="btn btn-danger">清空</a>
                                </div>

                                <table class="table table-hover table-bordered table-list">
                                    <thead>
                                    <tr>
                                        <th style="text-align:center;width: 3%">序号</th>
                                        <th style="text-align:center;width:10%">合同号</th>
                                        <th style="text-align:center;width:8%">交件人</th>
                                        <th style="text-align:center;width:8%">图录号</th>
                                        <th style="text-align:center;width:10%">状态</th>
                                        <th style="text-align:center;width:10%">库区号</th>
                                        <th style="text-align:center;width:10%">操作</th>
                                    </tr>
                                    </thead>
                                    </tbody>
                                    {if condition="isset($list[0])"}
                                    {foreach name="list" item="v"}
                                        <tr>
                                            <td style="text-align:center;"class="js-num"></td>
                                            <td style="text-align:center;">{$v.num??''}</td>
                                            <td style="text-align:center;">{$v.user??''}</td>
                                            <td style="text-align:center;">{$v.card??''}</td>
                                            <td style="vertical-align: center;">
                                                {if condition="isset($v.state)?$v.state:''==0"}<span  class="label label-danger">在库</span>
                                                    {elseif condition="isset($v.state)?$v.state:''==1"}<span  class="label label-success">出库</span>
                                                    {elseif condition="isset($v.state)?$v.state:''==2"}<span class="label label-primary">转库</span>
                                                {/if}
                                                {if condition="isset($v.why)?$v.why:''==''"}
                                                <p></p>
                                                {else}
                                                <p>【{$v.why??''}】</p>
                                                {/if}
                                                 <!--  <span class="label label-success">出库</span> -->
                                            </td>
                                            <td style="text-align:center;">{$v.cnum??''}</td>
                                            <td style="text-align:center;"><a href="{:URL('kucun/outcollection?id='.$v['id'])}">出库</a></td>
                                        </tr>
                                        {/foreach}
                                        {else/}
                                        <tr>
                                            <td colspan="11" class="text-center">没有相关数据!</td>
                                        </tr>
                                    {/if}
                                    </tbody>
                                </table>
                            </form>
                             <div style="float:right;">
                         {$list->render()}
                         </div>
                        </div>
                       
                    </div>
           

                </div>
                
          
                
                
            </div>
        </div>
    </div>

    <!-- 全局js -->
    <script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>

    <!-- 自定义js -->
    <script src="__PUBLIC__/admin/js/content.js?v=1.0.0"></script>
    <!-- layerDate plugin javascript -->
    <script src="__PUBLIC__/admin/js/plugins/layer/laydate/laydate.js"></script>
</body>

</html>
<script>
    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);



    //日期范围限制001
    var start01 = {
        elem: '#start01',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end01 = {
        elem: '#end01',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start01);
    laydate(end01);

    //日期范围限制002
    var start02 = {
        elem: '#start02',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end02 = {
        elem: '#end02',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start02);
    laydate(end02);

    //日期范围限制003
    var start03 = {
        elem: '#start03',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end03 = {
        elem: '#end03',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start03);
    laydate(end03);
    
   
</script>
<script>
$(function () {
    // 编号自增
    for (var ii = 0; ii < $(".js-num").length; ii++) {
        $('.js-num').eq(ii).text(ii + 1);
    }
    // 全选
    $('.js-check-all-btn').click(function () {
        $('.js-check-all').prop('checked', this.checked);
        // 设置属性和值：
        // $(selector).prop(property, value)
    });
})

</script>